#ifndef __PTHREAD_POOL__
#define __PTHREAD_POOL__

#include "my_header.h"
#include "tidArr.h"
#include "taskQueue.h"
#include "workCmd.h"

typedef struct threadPool_s{
    //工人tid数组
    tidArr_t tidArr;
    //消息队列
    taskQueue_t taskQueue;
    //互斥锁
    pthread_mutex_t mutex;
    //信号变量
    pthread_cond_t cond;
    //退出标志位
    int flag;
}threadPool_t;

int initThreadPool(threadPool_t * pthreadPool,int workerNum);
int makeWorker(threadPool_t *pthreadPool);

int initTcp(char *ip,char *port);
int epollAdd(int epfd,int fd);
int epollDel(int epfd,int fd);

#endif
